using System.Reflection;
using System.Web.Security;

namespace Sfd.SqlAzureInstaller
{
    public class MyMembershipProvider : SqlMembershipProvider
    {
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            base.Initialize(name, config);
            
            var connectionStringField = GetType().BaseType.GetField("_sqlConnectionString", BindingFlags.Instance | BindingFlags.NonPublic);
            connectionStringField.SetValue(this, Program.GetConnectionString());
        }
    }
}